/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef NETSTACK_NETSTACK_NETWORK_PROFILER_H
#define NETSTACK_NETSTACK_NETWORK_PROFILER_H

#include <memory>
#include "i_network_message.h"

namespace OHOS::NetStack {
class NetworkProfilerUtils {
public:
    NetworkProfilerUtils();
    ~NetworkProfilerUtils();
    void NetworkProfiling(INetworkMessage &networkMessage);

private:
    static bool IsProfilerEnable();
    void SendNetworkProfiling();
    static uint64_t GetBootTime();

private:
    bool enable_ = false;
    uint64_t requestBeginTime_ = 0;
    DfxMessage msg_;
    void *data_ = nullptr;
    uint32_t dataSize_ = 0;
};
}
#endif //NETSTACK_NETSTACK_NETWORK_PROFILER_H
